import { createApp } from 'vue';
import pinia from '/@/stores/index';
import App from './App.vue';
import router from './router';
import { directive } from '/@/directive/index';
import { i18n } from '/@/i18n/index';
import other from '/@/utils/other';
import "jsoneditor";

import ElementPlus from 'element-plus';
import VForm3 from 'vform3-builds'  //引入VForm3库
import 'element-plus/dist/index.css';
import 'vform3-builds/dist/designer.style.css'  //引入VForm3样式
import '/@/theme/index.scss';
import VueGridLayout from 'vue-grid-layout';
//全局数据字典下拉框组件
import DicSelect from '/@/components/dicSelect/index.vue';
//定义一个全局的后端接口地址，表单设计器使用
window.API_SERVER = import.meta.env.VITE_API_URL

const app = createApp(App);

directive(app);
other.elSvg(app);

app.use(pinia).use(router).use(ElementPlus, { i18n: i18n.global.t }).use(i18n).use(VueGridLayout).use(VForm3).mount('#app');
//全局数据字典下拉框
app.component('DicSelect', DicSelect)
